﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>SelectTree 弹出选择树（JS）</title>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" /><link href="../demo.css" rel="stylesheet" type="text/css" />

    
    <script src="../../scripts/boot.js" type="text/javascript"></script>
    

    <script src="../CommonLibs/TreeSelectWindow.js" type="text/javascript"></script>    
</head>
<body>
    <h1>SelectTree 弹出选择树（JS）</h1>      

    <input id="btnEdit1" class="mini-buttonedit" onbuttonclick="onButtonEdit"/>    
    
    <script type="text/javascript">
        mini.parse();

        function onButtonEdit(e) {
            var buttonEdit = e.sender;
            
            var win = new TreeSelectWindow();
            win.set({
//                multiSelect: true,
//                showFolderCheckBox: true,
//                checkRecursive: true,                
                url: bootPATH + "../demo/data/listTree.txt",    
                title: "选择树形",
                width: 350,
                height: 350
            });
            
            win.show();

            //初始化数据
            win.setData(null, function (action) {
                if (action == "ok") {
                    //获取数据
                    var data = win.getData();
                    if (data) {
                        buttonEdit.setValue(data.id);
                        buttonEdit.setText(data.text);

                    }
                }
            });
        }
        
    </script>
    <div class="description">
        <h3>Description</h3>
        
    </div>
</body>
</html>